<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.tjsinfo.tjsoa.system.vo.User"%>
<%@page import="com.tjsinfo.tjsoa.messageImportant.vo.MessageImportantIncept"%>
<%@page import="com.tjsinfo.tjsoa.addresslist.vo.AddressListUser"%>
<%@page import="com.tjsinfo.tjsoa.addresslist.vo.AddressListSystemUser"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>

		<title>粮油集团办公自动化协作平台</title>
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" id="txlz7"/>
<link rel="stylesheet" type="text/css" href="<%=basePath %>ajaxFramework/ext-2.1/resources/css/ext-all.css" />
<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
		<style type="text/css">
td {
	font: 12px/ 170% "宋体", "新宋体", "黑体";
	color: #000
}

th {
	font: 12px/ 170% "宋体", "新宋体", "黑体";
	color: #000
}

.trBgColor {
	background-color: #A4D7E8;
	cursor: hand;
}

.black_overlays {
	display: none;
	position: absolute;
	top: 0%;
	left: 0%;
	width: 100%;
	height: 100%;
	background-color: #C1EBFC;
	z-index: 1002;
	-moz-opacity: 0.8;
	opacity: .80;
	filter: alpha(opacity =   30);
}

.insertGroup {
	display: none;
	position: absolute;
	border: 1px solid #FFF;
	border-bottom: none;
	z-index: 1002;
	overflow: auto;
}

.window {
	DISPLAY: none;
	LEFT: 300px;
	OVERFLOW: hidden;
	WIDTH: 500px;
	POSITION: absolute;
	TOP: 100px;
	HEIGHT: 200px
}

.windowTop {
	BACKGROUND-POSITION: right top;
	BACKGROUND-IMAGE:
		url(<%=basePath%>/images/window_top_end.png);
	OVERFLOW: hidden;
	CURSOR: move;
	BACKGROUND-REPEAT: no-repeat;
	POSITION: relative;
	HEIGHT: 30px
}

.windowTopContent {
	BACKGROUND-POSITION: left top;
	FONT-WEIGHT: bold;
	FONT-SIZE: 14px;
	BACKGROUND-IMAGE:
		url(<%=basePath%>/images/window_top_start.png);
	OVERFLOW: hidden;
	COLOR: #206D85;
	TEXT-INDENT: 10px;
	LINE-HEIGHT: 30px;
	MARGIN-RIGHT: 13px;
	BACKGROUND-REPEAT: no-repeat;
	FONT-FAMILY: Arial, Helvetica, sans-serif;
	HEIGHT: 30px
}

#windowBottom {
	BACKGROUND-POSITION: right bottom;
	BACKGROUND-IMAGE:
		url(<%=basePath%>/images/window_bottom_end.png);
	BACKGROUND-REPEAT: no-repeat;
	POSITION: relative;
	HEIGHT: 370px
}

.windowBottomContent {
	BACKGROUND-POSITION: left bottom;
	BACKGROUND-IMAGE:
		url(<%=basePath%>/images/window_bottom_start.png);
	MARGIN-RIGHT: 13px;
	BACKGROUND-REPEAT: no-repeat;
	POSITION: relative;
	HEIGHT: 370px
}

.windowResize {
	RIGHT: 3px;
	CURSOR: se-resize;
	BOTTOM: 5px;
	POSITION: absolute
}

#windowClose {
	RIGHT: 10px;
	CURSOR: pointer;
	POSITION: absolute;
	TOP: 10px
}

.windowContent {
	BORDER-RIGHT: #6caf00 1px solid;
	BORDER-TOP: #6caf00 1px solid;
	FONT-SIZE: 11px;
	LEFT: 10px;
	OVERFLOW: auto;
	BORDER-LEFT: #6caf00 1px solid;
	WIDTH: 475px;
	MARGIN-RIGHT: 15px;
	BORDER-BOTTOM: #6caf00 1px solid;
	FONT-FAMILY: Arial, Helvetica, sans-serif;
	POSITION: absolute;
	TOP: 30px;
	HEIGHT: 150px;
	BACKGROUND-COLOR: #fff
}

.lan01 {
	background: url(<%=basePath%>images/lanbg01.gif) no-repeat 0 0;
	width: 6px;
	height: 24px;
}

.lan02 {
	background: url(<%=basePath%>images/lanbg02.gif) repeat-x;
	width: 99%;
	height: 24px;
}

.lan03 {
	background: url(<%=basePath%>images/lanbg03.gif) no-repeat;
	width: 8px;
	height: 24px;
}

.cha {
	padding-top: 3px;
}
		.daohang {
		    background-image: url(<%=basePath%>images/ju.gif) !important;
		}
</style>
		<script type='text/javascript'
			src='<%=basePath%>dwr/interface/MessageImportantInceptBo.js'></script>
		<script type='text/javascript'
			src='<%=basePath%>dwr/interface/OfficeResourceRequestBo.js'></script>
		<script type='text/javascript' src="<%=basePath%>dwr/engine.js"></script>
		<script type='text/javascript' src="<%=basePath%>dwr/util.js"></script>
		<%
			List<AddressListSystemUser> list = (List<AddressListSystemUser>) request
					.getAttribute("list");
			int pagecount = 0;
			if (list.size() != 0) {
				pagecount = list.size();
			}
		%>
		<script language="JavaScript" type="text/javascript">//最大数据量
	 	window.onload = function(){
		initpage(1);
			var tb = new Ext.Toolbar(
				{
					height:25
				}
			);
		
		    tb.render('menu');
			tb.add(
		    {
		            text:'',
		            iconCls: 'dao1hang',
		        	handler: function(){
		        		location.href="<%=basePath%>tjsinfo/tjsoa/system/main.do";
					}
		    }
		    );
		
		}
	 	
var total="<%=pagecount%>";
//每页的显示量
var pagesize="17";
//一共有多少页


var pagenum=Math.ceil(total/pagesize);
//生成导航
var nowpage = 1;
function initpage(nowpage){
var pagenav='<a>共'+pagenum+'页,当前为'+nowpage+'页</a>,<a href="javaScript:goToPage(1);">第一页</a>,<a href="javaScript:up('+ nowpage+');">上一页</a> ';
pagenav += '<select onchange="goToPage(this.value);" id="pageselect">';
for(i=1;i<=pagenum;i++){
	if(i==nowpage){
		pagenav += '<option value="'+i+'" selected="selected">'+i+'</option>';
	}else{
		pagenav += '<option value="'+i+'">'+i+'</option>';
	}
}
pagenav += '</select>';
pagenav += '<a href="javaScript:down('+ nowpage+');">下一页</a>,<a href="javaScript:goToPage('+ pagenum+');">最后一页</a>';
if(pagenum != 0){
document.getElementById('page').innerHTML=pagenav;
}
}
//翻页
var deletei = '';
function goToPage(page){
var z = deletei.split(",");
var start=(page-1)*pagesize;
var max=page*pagesize;
var bl = true;
for(vs=0;vs<total;vs++){
	var obj=document.getElementById('item_' + vs);
	obj.style.display="none";
	bl = true;
}
if(max>total)max=total;
for(v=start;v<max;v++){
	var obj=document.getElementById('item_' + v);
	for(var j = 0;j<z.length;j++){
		if(z[j] != '' && z[j] == v){
			bl=false;
		}
	}
	if(deletei == '')bl=true;
	if(bl)obj.style.display="block"; else obj.style.display="none";
}
initpage(page);
}
//上一页


function up(nowpage){
if(nowpage>1)goToPage((nowpage-1));
}
//下一页


function down(nowpage){
if(nowpage<pagenum)goToPage((nowpage+1));
}
		function init(){
			window.parent.frames.mainFrame.location.reload();
		}
</script>
	</head>

	<body>
		<div id="right" style="z-index: 19; height: 98%">
			<div id="menu" style="padding-top: 4px;"></div>
			<table width="100%" border="0" cellspacing="0" cellpadding="0"
				height="100%">
				<tr>
					<td width="100%" valign="top" height="100%">
						<div class="contab" style="height: 90%; width: 100%">
							<table class="p_06" width="100%" border="0" cellspacing="0"
								id="mytable">
								<tr align="center" />
								<tr>
									<th width="15%" style="text-align: center;">
										姓名
									</th>
									<th width="15%" style="text-align: center;">
										手机
									</th>
									<th width="20%" style="text-align: center;">
										单位
									</th>
									<th width="20%" style="text-align: center;">
										部门
									</th>
									<th width="15%" style="text-align: center;">
										单位电话
									</th>
									<th width="15%" style="text-align: center;">
										操作
									</th>
								</tr>
								<%
									int i = 0;
									for (AddressListSystemUser user : list) {
										String user_id = user.getUserId().toString();
										String username = user.getUserName();
										String shouji = user.getMobile();
										String sector = user.getSector();
										String company = user.getCompany();
										String companyPhone = user.getCompanyPhone();
										
								%>
								<tr onmouseover='this.className="trBgColor"'
									onmouseout='this.className=""' id="item_<%=i%>">
									<td><%=username%></td>
									<td><%=shouji%></td>
									<td><%=company%></td>
									<td><%=sector%></td>
									<td><%=companyPhone%></td>
									<td><a href="tjsinfo/tjsoa/addresslist/toSystemUser.do?user_id=<%=user_id %>">查看</a>
									</td>
								</tr>
								<%
									i++;
									}
								%>
								<tr align="center">
									<td colspan="7">
										<div class="pages" id="page">
										</div>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
			</table>
		</div>
		<div class="insertGroup" id="shaodeng">
			<table width="478" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td height="24" align="left">
						<b>请求正在处理中,请稍候....</b>
					</td>
				</tr>
			</table>
		</div>
		<div id="blackdiv" class="black_overlays">
			<iframe
				style="width: 100%; height: 100%; filter: alpha(opacity =   0); -moz-opacity: 0"></iframe>
		</div>
	<script>
		for(vs=1;vs<total;vs++){
			var obj=document.getElementById('item_' + vs);
			obj.style.display="none";
			for(v=1;v<pagesize;v++){
				if(vs==v){
					var obj=document.getElementById('item_' + vs);
					obj.style.display="block";
				}
			}
		}
	</script>
	</body>
</html>
